package com.longteng.lesson2.domain;

import javax.validation.Valid;

/**
 * Created by taki
 * DATE : 2018/11/4 0004
 * TIME : 22:58
 * PROJECT : java-lesson
 * PACKAGE : com.longteng.lesson
 *
 * @author <a href="mailto:165157905@qq.com">taki</a>
 */
public class Student extends Person {
    /**
     * 性别的注释
     * **/
    private int sex;
    Student(){}

    Student(String name,int age,int sex){
        super(name,age);
        this.sex=sex;
    }
    @Override
    public void showInfo(){
        System.out.println(this.getSex()+","+super.getName()+","+this.getAge());
    }

    public void studyJava(){
        System.out.println("我在学java");
    }

    public int getSex() {
        return sex;
    }

    public void setSex(int sex) {
        this.sex = sex;
    }
}
